# String variable syntax

Tip: | Embedded variables are case sensitive, and must be in the proper format and syntax to work. If you make a mistake, your variable will be treated as a piece of text. Therefore, do not attempt to edit embedded variables manually. Use the Insert Variable and Edit variable dialog boxes to avoid problems.

String embedded variables use this format:

/*LS:# Tag_name*/

The syntax is:

- an opening escape sequence ‘/*’
- followed by the letter 'L' (for Literal) preventing a tag read for the variable, (if the Literal string option is chosen in the String Variable dialog box)
- followed by the letter 'S'
- followed by a colon ':'
- followed by a numeric length field (if the Fixed number of characters check box is checked in the String Variable dialog box)
- followed by a space character
- followed by the tag name, tag placeholder (#1, #2, etc.)
- followed by a closing escape sequence '*/'

For example, to display the current value of a string tag called Blower_status, with a fixed length of 20 characters, the correct syntax would be:

/*S:20 Blower_status*/

On the display during development, you would see as many 's' characters as specified in the variable, in this case, 20:

ssssssssssssssssssss

At run time, you would see the value of the tag shown as a string:

`Functioning normally`

Tip: | If the Fixed number of characters check box and the Right-most characters in string are displayed check box are checked in the String Variable dialog box, the numeric length field will be a negative number. If the Fixed number of characters check box and the Show * character if string is longer than field width check box are checked in the String Variable dialog box, the keyword SHOWSTAR will be added to the embedded variable string after the tag or parameter field. For example, to display the current value of the string tag called Blower_status, with a fixed length of 20 characters, counting from the right, and displaying the * character if the string exceeds the field width, the correct syntax would be: /*S:-20 Blower_status SHOWSTAR*/

## See also

About embedded variables

Insert a string variable